<!-- 重资产-经营业绩完成情况 -->
<template>
	<mostDrawer :isShow="isShow" :isReadOnly="isReadOnly" :handleType="handleType" :currentRow="currentRow" :tableHeaderList="tableHeaderList" :noFormatColNumList="noFormatColNumList" :levelThirdRowList="levelThirdRowList" @close="handleClose" :rowClassName="rowClassName"></mostDrawer>
</template>

<script setup>
	import { ref } from 'vue';
	import { setOrder } from '@/utils/publicUtils';
	import mostDrawer from '../components/mostDrawer.vue';
	defineProps({
		isShow: { type: Boolean, default: false },
		isReadOnly: { type: Boolean, default: true },
		handleType: { type: String, default: '' },
		currentRow: { type: Object },
	});

	const emit = defineEmits(['close']);
	const noFormatColNumList = ref([0])
	const levelThirdRowList = ref([1,2,3,4,6,7,8,9])

	//关闭抽屉
	const handleClose = data => {
		emit('close', data);
	};

	let tableHeaderList = ref([
		{ label: '指标', isTxt: true },
		{ label: '年度工作目标', list: [{ label: 'A' }]},
		{ label: '年度累计目标', list: [{ label: 'B' }] },
		{ label: '年度累计完成情况', list: [{ label: 'C' }] },
		{ label: '累计目标完成率', unit:"%", list: [{ label: 'D=C/B', unit:"%" }] },
		{ label: '年度目标完成率', unit:"%", list: [{ label: 'F=C/A', unit:"%" }] },
	]);

	//表格颜色
	const rowClassName = data => {
		if (data.rowIndex === 0 || data.rowIndex === 5) {
			return 'bg-color-eef4fe';
		}
		return '';
	};

	setOrder(tableHeaderList.value);
</script>
